
/*
 *  Copyright (c) 2016. For Intelligent Group.
 *
 */

package com.intelligent.ispc.client.core.validator;

import com.intelligent.ispc.client.utils.binding.AbstractBean;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;

/**
 * Created by Lucien.Chen on 2016/9/9.
 */
public class SysSpcCpwDto extends AbstractBean {

    public static final String PROPERTYNAME_SPCNDGROUPKEY = "spcNdGroupKey";
    public static final String PROPERTYNAME_SPCCCGROUPKEY = "spcCcGroupKey";
    public static final String PROPERTYNAME_CONFIGTYPE = "configType";
    public static final String PROPERTYNAME_NAME = "name";
    public static final String PROPERTYNAME_VALUE1 = "value1";
    public static final String PROPERTYNAME_VALUE2 = "value2";
    public static final String PROPERTYNAME_VALUE3 = "value3";
    public static final String PROPERTYNAME_VALUE4 = "value4";

    private Long id;
    private String spcNdGroupKey;
    private String spcCcGroupKey;
    private String configType;
    private String name;
    @NotEmpty(message = "Not be empty")
    @Digits(integer = 9, fraction = 2, message = "must be 2 decimal")
    @Min(value = 0, message = "Can't be negative number")
    private String value1;
    @NotEmpty(message = "Not be empty")
    @Digits(integer = 9, fraction = 2, message = "must be 2 decimal")
    @Min(value = 0, message = "Can't be negative number")
    private String value2;
    @NotEmpty(message = "Not be empty")
    @Digits(integer = 9, fraction = 2, message = "must be 2 decimal")
    @Min(value = 0, message = "Can't be negative number")
    private String value3;
    @NotEmpty(message = "Not be empty")
    @Digits(integer = 9, fraction = 2, message = "must be 2 decimal")
    @Min(value = 0, message = "Can't be negative number")
    private String value4;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSpcNdGroupKey() {
        return spcNdGroupKey;
    }

    /**
     * fire paroperty change for spcNdGroupKey seted
     *
     * @param spcNdGroupKey new spcNdGroupKey value
     */
    public void setSpcNdGroupKey(String spcNdGroupKey) {
        firePropertyChange(PROPERTYNAME_SPCNDGROUPKEY, this.spcNdGroupKey, this.spcNdGroupKey = spcNdGroupKey);
    }

    public String getSpcCcGroupKey() {
        return spcCcGroupKey;
    }

    /**
     * fire paroperty change for spcCcGroupKey seted
     *
     * @param spcCcGroupKey new spcCcGroupKey value
     */
    public void setSpcCcGroupKey(String spcCcGroupKey) {
        firePropertyChange(PROPERTYNAME_SPCCCGROUPKEY, this.spcCcGroupKey, this.spcCcGroupKey = spcCcGroupKey);
    }

    public String getConfigType() {
        return configType;
    }

    /**
     * fire paroperty change for configType seted
     *
     * @param configType new configType value
     */
    public void setConfigType(String configType) {
        firePropertyChange(PROPERTYNAME_CONFIGTYPE, this.configType, this.configType = configType);
    }

    public String getName() {
        return name;
    }

    /**
     * fire paroperty change for name seted
     *
     * @param name new name value
     */
    public void setName(String name) {
        firePropertyChange(PROPERTYNAME_NAME, this.name, this.name = name);
    }

    public String getValue1() {
        return value1;
    }

    /**
     * fire paroperty change for value1 seted
     *
     * @param value1 new value1 value
     */
    public void setValue1(String value1) {
        firePropertyChange(PROPERTYNAME_VALUE1, this.value1, this.value1 = value1);
    }

    public String getValue2() {
        return value2;
    }

    /**
     * fire paroperty change for value2 seted
     *
     * @param value2 new value2 value
     */
    public void setValue2(String value2) {
        firePropertyChange(PROPERTYNAME_VALUE2, this.value2, this.value2 = value2);
    }

    public String getValue3() {
        return value3;
    }

    /**
     * fire paroperty change for value3 seted
     *
     * @param value3 new value3 value
     */
    public void setValue3(String value3) {
        firePropertyChange(PROPERTYNAME_VALUE3, this.value3, this.value3 = value3);
    }

    public String getValue4() {
        return value4;
    }

    /**
     * fire paroperty change for value4 seted
     *
     * @param value4 new value4 value
     */
    public void setValue4(String value4) {
        firePropertyChange(PROPERTYNAME_VALUE4, this.value4, this.value4 = value4);
    }

}
